//
//  MyButtonView.m
//  大轮胎
//
//  Created by 赵学文 on 2017/3/31.
//  Copyright © 2017年 zyc. All rights reserved.
//

#import "MyButtonView.h"
#import <SDAutoLayout.h>
@implementation MyButtonView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview: self.fie1];
        [self addSubview: self.fie2];
        [self addSubview: self.EnterBut];
        [self addSubview: self.LoginBut];
        
        _fie1.sd_layout.widthIs(200).heightIs(45).leftSpaceToView(self,self.frame.size.width/2-100).topSpaceToView(self,self.frame.size.height/3-100);
        _fie2.sd_layout.widthIs(200).heightIs(45).leftSpaceToView(self,self.frame.size.width/2-100).topSpaceToView(self,self.frame.size.height/3-50);
        _EnterBut.sd_layout.widthIs(100).heightIs(44).leftSpaceToView(self,self.frame.size.width/3-50).topSpaceToView(self,self.frame.size.height/3+100);
        _LoginBut.sd_layout.widthIs(100).heightIs(44).leftSpaceToView(self,self.frame.size.width/3*2-50).topSpaceToView(self,self.frame.size.height/3+100);
        
    }
    return self;
}

- (UITextField *)fie1{
    if (!_fie1) {
        _fie1 = [[UITextField alloc]init];
        _fie1.placeholder = @"请输入帐号";
        
    }
    return _fie1;
}
- (UITextField *)fie2{
    if (!_fie2) {
        _fie2 = [[UITextField alloc]init];
        _fie2.placeholder = @"请输入密码";
        
    }
    return _fie2;
}
- (UIButton *)EnterBut{
    if (!_EnterBut){
        _EnterBut = [[UIButton alloc]init];
        _EnterBut.backgroundColor = [UIColor orangeColor];
        [_EnterBut setTitle:@"登录" forState:0];
        
        
    }
    return _EnterBut;
}
- (UIButton *)LoginBut{
    if (!_LoginBut) {
        _LoginBut = [[UIButton alloc]init];
        _LoginBut.backgroundColor = [UIColor orangeColor];
        [_LoginBut setTitle:@"注册" forState:0];
        
    }
    return _LoginBut;
}

@end
